package com.buba.springcloud.service;

import com.buba.springcloud.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @author 张宇飞
 * @Description:
 * @date 2021/8/1117:00
 */
@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPT")
public interface DeptClientService {
    @GetMapping("/dept/get/{deptId}")
    Dept selDeptById(@PathVariable("deptId") long deptId);

    @PostMapping("/dept/addDept")
    boolean addDept(Dept dept);

    @GetMapping("/dept/list")
    List<Dept> selDept();

}
